Adwaita: volume button and scale button padding
authorLapo Calamandrei <calamandrei@gmail.com>
Thu, 18 Jun 2015 10:46:00 +0000 (12:46 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Thu, 18 Jun 2015 10:46:00 +0000 (12:46 +0200)
I was assuming that GtkVolumeButton and GtkScaleButton could only
contain a icon, now they get the image-button padding by default,
but if the text-button class is applied it is not overridden.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index aeb1e2563e2e14b2b66fd1a0e3ed484f35658266..ae890413819d5ae31ee7e9129fa522d918c58746 100644 (file)
@@ -3210,7 +3210,14 @@ GtkColorSwatch {
   }
 }
 
-GtkVolumeButton.button { padding: 8px; }
+GtkScaleButton.button,
+GtkVolumeButton.button {
+  // I assume both are image-button *by default*
+  // with the image-button/text-button classes automagically applied depending on the button child these selectors can be deleted.
+  @extend .image-button;
+
+  &.text-button { @extend .text-button }
+}
 
 /**********************
  * Window Decorations *
index 56d00c1861e69acf4767f5090edef1862e5716ea..84df56b4cb64425e5be2342001bc01286b6d91d2 100644 (file)
@@ -449,7 +449,8 @@ GtkTextView {
     outline-color: rgba(238, 238, 236, 0.3);
     border: none;
     box-shadow: none; }
-    .button.osd.image-button, .header-bar .osd.titlebutton.button,
+    .button.osd.image-button, GtkScaleButton.button.osd,
+    GtkVolumeButton.button.osd, .header-bar .osd.titlebutton.button,
     .titlebar .osd.titlebutton.button {
       padding: 13px; }
     .button.osd:hover {
@@ -911,20 +912,25 @@ GtkTextView {
         box-shadow: none;
         text-shadow: none;
         icon-shadow: none; }
-  .button.image-button, .header-bar .titlebutton.button,
+  .button.image-button, GtkScaleButton.button,
+  GtkVolumeButton.button, .header-bar .titlebutton.button,
   .titlebar .titlebutton.button {
     padding: 8px; }
-  .button.text-button, .header-bar .text-button.button.titlebutton,
+  .button.text-button, GtkScaleButton.button.text-button,
+  GtkVolumeButton.button.text-button, .header-bar .text-button.button.titlebutton,
   .titlebar .text-button.button.titlebutton {
     padding-left: 16px;
     padding-right: 16px; }
-  .button.text-button.image-button, .header-bar .text-button.titlebutton.button,
+  .button.text-button.image-button, GtkScaleButton.button.text-button,
+  GtkVolumeButton.button.text-button, .header-bar .text-button.titlebutton.button,
   .titlebar .text-button.titlebutton.button {
     padding: 5px 8px 6px; }
-    .button.text-button.image-button .label:first-child, .header-bar .text-button.titlebutton.button .label:first-child,
+    .button.text-button.image-button .label:first-child, GtkScaleButton.button.text-button .label:first-child,
+    GtkVolumeButton.button.text-button .label:first-child, .header-bar .text-button.titlebutton.button .label:first-child,
     .titlebar .text-button.titlebutton.button .label:first-child {
       padding-left: 8px; }
-    .button.text-button.image-button .label:last-child, .header-bar .text-button.titlebutton.button .label:last-child,
+    .button.text-button.image-button .label:last-child, GtkScaleButton.button.text-button .label:last-child,
+    GtkVolumeButton.button.text-button .label:last-child, .header-bar .text-button.titlebutton.button .label:last-child,
     .titlebar .text-button.titlebutton.button .label:last-child {
       padding-right: 8px; }
   .stack-switcher > .button, .header-bar .stack-switcher > .button.titlebutton,
@@ -942,7 +948,8 @@ GtkTextView {
     .stack-switcher > .button.text-button, .header-bar .stack-switcher > .text-button.button.titlebutton,
     .titlebar .stack-switcher > .text-button.button.titlebutton {
       padding: 5px 10px 6px; }
-    .stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button,
+    .stack-switcher > .button.image-button, .stack-switcher > GtkScaleButton.button,
+    .stack-switcher > GtkVolumeButton.button, .header-bar .stack-switcher > .titlebutton.button,
     .titlebar .stack-switcher > .titlebutton.button {
       padding: 5px 2px; }
     .stack-switcher > .button.needs-attention:active > .label, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > .label, .stack-switcher > .button.needs-attention:checked > GtkImage {
@@ -3972,7 +3979,8 @@ GtkPlacesSidebar.sidebar .sidebar-new-bookmark-row {
         box-shadow: inset 0 0 transparentize(white, 1);
         icon-shadow: none;
       } */ }
-  .sidebar-button.button.image-button, .header-bar .sidebar-button.titlebutton.button,
+  .sidebar-button.button.image-button, GtkScaleButton.sidebar-button.button,
+  GtkVolumeButton.sidebar-button.button, .header-bar .sidebar-button.titlebutton.button,
   .titlebar .sidebar-button.titlebutton.button {
     padding: 5px; }
   .sidebar-button.button:not(:hover):not(:active) > GtkImage, .header-bar .sidebar-button.button.titlebutton:not(:hover):not(:active) > GtkImage,
@@ -4288,10 +4296,6 @@ GtkColorSwatch {
     background-color: rgba(238, 238, 236, 0.1);
     border-radius: 5px; }
 
-GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
-.titlebar GtkVolumeButton.button.titlebutton {
-  padding: 8px; }
-
 /**********************
  * Window Decorations *
  *********************/
index 90d25c7f2d25d8f1953ec9c0c1f9fae5602dd13b..1afb73067a2f65f8a76b4781d6beb522a18a3b2c 100644 (file)
@@ -449,7 +449,8 @@ GtkTextView {
     outline-color: rgba(238, 238, 236, 0.3);
     border: none;
     box-shadow: none; }
-    .button.osd.image-button, .header-bar .osd.titlebutton.button,
+    .button.osd.image-button, GtkScaleButton.button.osd,
+    GtkVolumeButton.button.osd, .header-bar .osd.titlebutton.button,
     .titlebar .osd.titlebutton.button {
       padding: 13px; }
     .button.osd:hover {
@@ -911,20 +912,25 @@ GtkTextView {
         box-shadow: none;
         text-shadow: none;
         icon-shadow: none; }
-  .button.image-button, .header-bar .titlebutton.button,
+  .button.image-button, GtkScaleButton.button,
+  GtkVolumeButton.button, .header-bar .titlebutton.button,
   .titlebar .titlebutton.button {
     padding: 8px; }
-  .button.text-button, .header-bar .text-button.button.titlebutton,
+  .button.text-button, GtkScaleButton.button.text-button,
+  GtkVolumeButton.button.text-button, .header-bar .text-button.button.titlebutton,
   .titlebar .text-button.button.titlebutton {
     padding-left: 16px;
     padding-right: 16px; }
-  .button.text-button.image-button, .header-bar .text-button.titlebutton.button,
+  .button.text-button.image-button, GtkScaleButton.button.text-button,
+  GtkVolumeButton.button.text-button, .header-bar .text-button.titlebutton.button,
   .titlebar .text-button.titlebutton.button {
     padding: 5px 8px 6px; }
-    .button.text-button.image-button .label:first-child, .header-bar .text-button.titlebutton.button .label:first-child,
+    .button.text-button.image-button .label:first-child, GtkScaleButton.button.text-button .label:first-child,
+    GtkVolumeButton.button.text-button .label:first-child, .header-bar .text-button.titlebutton.button .label:first-child,
     .titlebar .text-button.titlebutton.button .label:first-child {
       padding-left: 8px; }
-    .button.text-button.image-button .label:last-child, .header-bar .text-button.titlebutton.button .label:last-child,
+    .button.text-button.image-button .label:last-child, GtkScaleButton.button.text-button .label:last-child,
+    GtkVolumeButton.button.text-button .label:last-child, .header-bar .text-button.titlebutton.button .label:last-child,
     .titlebar .text-button.titlebutton.button .label:last-child {
       padding-right: 8px; }
   .stack-switcher > .button, .header-bar .stack-switcher > .button.titlebutton,
@@ -942,7 +948,8 @@ GtkTextView {
     .stack-switcher > .button.text-button, .header-bar .stack-switcher > .text-button.button.titlebutton,
     .titlebar .stack-switcher > .text-button.button.titlebutton {
       padding: 5px 10px 6px; }
-    .stack-switcher > .button.image-button, .header-bar .stack-switcher > .titlebutton.button,
+    .stack-switcher > .button.image-button, .stack-switcher > GtkScaleButton.button,
+    .stack-switcher > GtkVolumeButton.button, .header-bar .stack-switcher > .titlebutton.button,
     .titlebar .stack-switcher > .titlebutton.button {
       padding: 5px 2px; }
     .stack-switcher > .button.needs-attention:active > .label, .stack-switcher > .button.needs-attention:active > GtkImage, .stack-switcher > .button.needs-attention:checked > .label, .stack-switcher > .button.needs-attention:checked > GtkImage {
@@ -4144,7 +4151,8 @@ GtkPlacesSidebar.sidebar .sidebar-new-bookmark-row {
         box-shadow: inset 0 0 transparentize(white, 1);
         icon-shadow: none;
       } */ }
-  .sidebar-button.button.image-button, .header-bar .sidebar-button.titlebutton.button,
+  .sidebar-button.button.image-button, GtkScaleButton.sidebar-button.button,
+  GtkVolumeButton.sidebar-button.button, .header-bar .sidebar-button.titlebutton.button,
   .titlebar .sidebar-button.titlebutton.button {
     padding: 5px; }
   .sidebar-button.button:not(:hover):not(:active) > GtkImage, .header-bar .sidebar-button.button.titlebutton:not(:hover):not(:active) > GtkImage,
@@ -4460,10 +4468,6 @@ GtkColorSwatch {
     background-color: rgba(46, 52, 54, 0.1);
     border-radius: 5px; }
 
-GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
-.titlebar GtkVolumeButton.button.titlebutton {
-  padding: 8px; }
-
 /**********************
  * Window Decorations *
  *********************/